// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({env: 'test-qch4n'})
const db = cloud.database({env: 'test-qch4n'})
// 云函数入口函数
exports.main = async (event, context) => {
  const { markerID } = event
  try {
    return await db.collection('warnList').where({
      _id: markerID
    }).remove()
  } catch (error) {
    console.log(error)
  }
}